import requests
import sys

productNumber = sys.argv[1]
brandKey = sys.argv[2]
url = "https://www.sigmaaldrich.com/catalog/PricingAvailability.do"

querystring = {"loadFor":"PRD_RS","productNumber":productNumber,"brandKey":brandKey}
# print (querystring)

headers = {
    'cookie': "JSESSIONID=313C65C46E9475D82D06E4831D48DBE3.stltcat12a; rxVisitor=1574239613902GALPSN0E8JTHLSDTH61SM37CITOG9C40; SessionPersistence=CLIENTCONTEXT%3A%3DvisitorId%253Danonymous%7CPROFILEDATA%3A%3Davatar%253D%252Fetc%252Fdesigns%252Fdefault%252Fimages%252Fsocial%252Favatar.png%252Cpath%253D%252Fhome%252Fusers%252Fa%252Fanonymous%252Fprofile%252CisLoggedIn%253Dfalse%252CisLoggedIn_xss%253Dfalse%252CauthorizableId%253Danonymous%252CauthorizableId_xss%253Danonymous%252CformattedName%253Danonymous%252CformattedName_xss%253Danonymous; _gcl_au=1.1.990559236.1574239615; _vwo_uuid_v2=D98A5B0B92DBB90625DD542E7F3D296DB|37f1859ec34fade976467991486537f9; _ga=GA1.2.1658591662.1574239615; _gid=GA1.2.566629217.1574239615; __unam=40e1073-16e8c9a953e-4bd50177-4; country=CHIM; SialLocaleDef=CountryCode~CN|WebLang~-7|; TLTSID=DEC742FC0CC3100C6073B5D3916CF137; TLTUID=DEC742FC0CC3100C6073B5D3916CF137; bm_mi=6F7BD556FA185F5D0BCF913CC2E09D7D~I8yPZm4gLCv3hTiHP3T82cqNKHTEI/K5aZqoPgoWAkseefvp7AMASE5XfJHbX8CZnqHKX0KzC7VxSYNQsXfQKQzsu90d41CmavM4WquPTDq533J/kAQykAM5X5BiseI17ldkzH+EBUbOu+rmkAEDYs6FVFt8NFmt6N1LZp2D297UyIhP3lQtRAAiiSbMWhzgD7ofTI9L0f1VWgr7W2oYrAPn6SEFrS7UOykd2rUIIk21O1r8cQM7WSsoD0+FGnPGtL+J3+6I7eGpgPTpXqluO7Ar0fV/wfYo9tCqXX1VIrk=; Cck=present; GUID=60a89ea8-23d4-4f63-83db-1dee56e900d1|NULL|1574384939297; ak_bmsc=6785ED6EE2727AADE4DB2A28D416D0BC7D38DA25D95500006634D75DDCD3B248~plpOjrHnTE5jhe6Q+Ovg+wU30HDwwW8Q5x2Nf8bZWVJCDo9vCRYiYAFBpfGZbkASQdnCbfJD0Rl/UMezjgY2yy88Gr1EpEc1hV39O/cd78DvCVe9j5Q3DKg8gPkiQoWDns8/Ltty6A1OA96/DDRrGZhXPMqtDPnDOq/PlOXLj1FoleV34nH/TAKYyo9r4h04JguV5xLbAmRDn12DO0Ip3Lw9DItgNXJGrzFvvPPEYM12prwb88z9Mdz5YoNIEN8eIS; UrCapture=f1f32003-6067-5db7-a8eb-0a27d61c4229; JabmoSP0ses.5e8a=*; AKA_A2=A; dtSa=-; JabmoSP0id.5e8a=cca6d0e5-e563-4322-a257-12eab8f83f35.1574304964.5.1574391214.1574331179.484e298a-2f47-4f7d-8ba5-3d202f77574b; dtCookie==3=srv=5=sn=90F7829A94BE42EA3E4A80FCB85B960A=perc=100000=ol=0=mul=1=app:1686b6dcc9c2ca9b=1; _4c_=lVPZTttAFP0V5Ic%2BMcnsSyRUtU5pkQIvJOIRjT3jxIpjRxMHF0r49t5xFlGoUOsH6y5nzl3mzK%2BkW%2Fg6GRGhODOEEk6YOk%2BW%2FnGTjH4l%2BTr%2BH%2BJvG6pklCzadr0ZDYdd1w025XxlbeVCmS8GebMa5ra1VTMfrkPjtnk7BACkh1Rhhc3nytbzi6fFp%2BDnZVNfpDfJeZI3zgMrMQM14OC3T%2BBxjcH0NZRN1sGB%2Ff3L%2FdU44qTQwhAp6SA2TJmRRED%2B2q8yH64cQGb1sm66GoKHLu7bx3Ws0fnsbOOWkEibbd2GR4ilP66uY6Aqfd32FWKxWW9JbLXxViPKHEe8kAxp5jJEnPdCeoOxI883s8nkud%2Bd5oYZahQQTCfT255i%2FC2FJi9TnKaMYJxKrNhXMYY9y%2FQS9rzHzv4Ve5jy0OZtaatJk9vKj30RZ9lPlcJGX9Kb5zufTWDhL0g9AziaWzuPe0CRahZSu263IQYKUjCKMUMSS4WEyxSy2mcIW6qcJDmn1MCRLDTdxodYaRGalT9TkagBmSR3Ze0gCW7whQ%2BhR32oFIBuyjZWf5s6ZECAb5LxRqMiGBhVPzc4TzG88XkLigLX6L1YZh%2BqZRrK%2BdyHa98umiiZabCujAy2gqyLRME7D8WjjFwLPnjLtlmfwrvz5Of%2B0XCluBAcYxBvCy9ES7DhA0Qo3eH1JJTljihfIGZhs1wTjHSBDTLSO%2BE4y6WJ8u85NcVESGEUV7v9zD0HO5UETTAOAPK%2B5P6SqNH%2Fd8xFBfVw%2FA5O%2FwKvj3O92tOxd40Nl4rF3ssjzL7JK7iJuKDuADgl4Cj7ExojAC2y7Ei2SV73aDijVL3v8eFUPJZTVmJEOdaIO8Fh99YgogWn2hLPJH1NSbUQTIkDJdF7xt3uNw%3D%3D; bm_sv=6636BC6870F2B4BA633691DFE1E0BA41~fc9/3AEp2ObkePjMyMo7iKMRspW9YSMF0q+BHuhLQChlwl6jgHn9nFZb9ad6qpQtJcOHR0imsRvZgtS4USJGJYUWTtJXB+JKKidEpMd0C7SOsoRrjlKAxHPybRUCReD8m9j8RrqyJ64TYkYncAGh4rAptGRcgb5JMTssMvnEnUs=; dtLatC=54; dtPC=5$591215468_262h2vIFJDLLJNAFLLBDIOHONJMJPKMNEPOCDQ; rxvt=1574393015784|1574390491169,JSESSIONID=313C65C46E9475D82D06E4831D48DBE3.stltcat12a; rxVisitor=1574239613902GALPSN0E8JTHLSDTH61SM37CITOG9C40; SessionPersistence=CLIENTCONTEXT%3A%3DvisitorId%253Danonymous%7CPROFILEDATA%3A%3Davatar%253D%252Fetc%252Fdesigns%252Fdefault%252Fimages%252Fsocial%252Favatar.png%252Cpath%253D%252Fhome%252Fusers%252Fa%252Fanonymous%252Fprofile%252CisLoggedIn%253Dfalse%252CisLoggedIn_xss%253Dfalse%252CauthorizableId%253Danonymous%252CauthorizableId_xss%253Danonymous%252CformattedName%253Danonymous%252CformattedName_xss%253Danonymous; _gcl_au=1.1.990559236.1574239615; _vwo_uuid_v2=D98A5B0B92DBB90625DD542E7F3D296DB|37f1859ec34fade976467991486537f9; _ga=GA1.2.1658591662.1574239615; _gid=GA1.2.566629217.1574239615; __unam=40e1073-16e8c9a953e-4bd50177-4; country=CHIM; SialLocaleDef=CountryCode~CN|WebLang~-7|; TLTSID=DEC742FC0CC3100C6073B5D3916CF137; TLTUID=DEC742FC0CC3100C6073B5D3916CF137; bm_mi=6F7BD556FA185F5D0BCF913CC2E09D7D~I8yPZm4gLCv3hTiHP3T82cqNKHTEI/K5aZqoPgoWAkseefvp7AMASE5XfJHbX8CZnqHKX0KzC7VxSYNQsXfQKQzsu90d41CmavM4WquPTDq533J/kAQykAM5X5BiseI17ldkzH+EBUbOu+rmkAEDYs6FVFt8NFmt6N1LZp2D297UyIhP3lQtRAAiiSbMWhzgD7ofTI9L0f1VWgr7W2oYrAPn6SEFrS7UOykd2rUIIk21O1r8cQM7WSsoD0+FGnPGtL+J3+6I7eGpgPTpXqluO7Ar0fV/wfYo9tCqXX1VIrk=; Cck=present; GUID=60a89ea8-23d4-4f63-83db-1dee56e900d1|NULL|1574384939297; ak_bmsc=6785ED6EE2727AADE4DB2A28D416D0BC7D38DA25D95500006634D75DDCD3B248~plpOjrHnTE5jhe6Q+Ovg+wU30HDwwW8Q5x2Nf8bZWVJCDo9vCRYiYAFBpfGZbkASQdnCbfJD0Rl/UMezjgY2yy88Gr1EpEc1hV39O/cd78DvCVe9j5Q3DKg8gPkiQoWDns8/Ltty6A1OA96/DDRrGZhXPMqtDPnDOq/PlOXLj1FoleV34nH/TAKYyo9r4h04JguV5xLbAmRDn12DO0Ip3Lw9DItgNXJGrzFvvPPEYM12prwb88z9Mdz5YoNIEN8eIS; UrCapture=f1f32003-6067-5db7-a8eb-0a27d61c4229; JabmoSP0ses.5e8a=*; AKA_A2=A; dtSa=-; JabmoSP0id.5e8a=cca6d0e5-e563-4322-a257-12eab8f83f35.1574304964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xt3uNw%3D%3D; bm_sv=6636BC6870F2B4BA633691DFE1E0BA41~fc9/3AEp2ObkePjMyMo7iKMRspW9YSMF0q+BHuhLQChlwl6jgHn9nFZb9ad6qpQtJcOHR0imsRvZgtS4USJGJYUWTtJXB+JKKidEpMd0C7SOsoRrjlKAxHPybRUCReD8m9j8RrqyJ64TYkYncAGh4rAptGRcgb5JMTssMvnEnUs=; dtLatC=54; dtPC=5$591215468_262h2vIFJDLLJNAFLLBDIOHONJMJPKMNEPOCDQ; rxvt=1574393015784|1574390491169; JSESSIONID=EB1127E82697BC01E7EBC59FF8AC189D.stltcat12a; ak_bmsc=6785ED6EE2727AADE4DB2A28D416D0BC7D38DA25D95500006634D75DDCD3B248~plpOjrHnTE5jhe6Q+Ovg+wU30HDwwW8Q5x2Nf8bZWVJCDo9vCRYiYAFBpfGZbkASQdnCbfJD0Rl/UMezjgY2yy88Gr1EpEc1hV39O/cd78DvCVe9j5Q3DKg8gPkiQoWDns8/Ltty6A1OA96/DDRrGZhXPMqtDPnDOq/PlOXLj1FoleV34nH/TAKYyo9r4h04JguV5xLbAmRDn12DO0Ip3Lw9DItgNXJGrzFvvPPEYM12prwb88z9Mdz5YoNIEN8eIS",
    'User-Agent': "PostmanRuntime/7.20.1",
    'Accept': "*/*",
    'Cache-Control': "no-cache",
    'Postman-Token': "ca6dbb8d-b274-48b9-b131-389c2c99141f,1a7c01a9-1bf1-4f86-8071-27bbf7d6a0e6",
    'Host': "www.sigmaaldrich.com",
    'Accept-Encoding': "gzip, deflate",
    'Content-Length': "0",
    'Connection': "keep-alive",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, headers=headers, params=querystring)

print(response.text)

#命令行样例 python SigmaAldrich_PriceRequest.py 270709 SIGALD